<?php
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;

class CategoryControllerTest extends TestCase
{
    public function setUp() {
        require_once __DIR__.'/../../../../../app/AppKernel.php';
        $kernel = new \AppKernel('prod', true);
        $kernel->boot();
        // START: init service kernel
        $serviceKernel = ServiceKernel::create($kernel->getEnvironment(), $kernel->isDebug());
        $serviceKernel->setParameterBag($kernel->getContainer()->getParameterBag());
        $serviceKernel->setConnection($kernel->getContainer()->get('database_connection'));
        $serviceKernel->getConnection()->exec('SET NAMES UTF8');

    }

   public function testCateg()
   {
        $categ = new \AppBundle\Controller\CategoryController();
        $this->$this->assertEquals("Test ok",$categ->categAction());
   }
}